//
//  NewsEmptyView.m
//  NuwaRobot
//
//  Created by Kendama on 2017/12/4.
//  Copyright © 2017年 Kendama. All rights reserved.
//

#import "NewsEmptyView.h"

@implementation NewsEmptyView

#pragma mark -- 懒加载
- (UILabel *)emptyLabel{
    
    if (!_emptyLabel) {
        _emptyLabel = [[UILabel alloc]init];
        _emptyLabel.text = @"暂无消息";
        _emptyLabel.font = fontCommonSize;
        _emptyLabel.textAlignment = NSTextAlignmentCenter;
        _emptyLabel.textColor = rgba(88,111,161,1);
        [self addSubview:_emptyLabel];
    }
    return _emptyLabel;
}

- (UIImageView *)emptyImageView
{
    if(!_emptyImageView)
    {
        UIView *superView = self;
        _emptyImageView = [[UIImageView alloc]init];
        _emptyImageView.image = [UIImage imageNamed:@"news-sky"];
        [superView addSubview:_emptyImageView];
    }
    return _emptyImageView;
}


- (void)masLayoutSubview
{
    __weak UIView *superView = self;
    
    [self.emptyLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(superView);
        make.top.mas_equalTo(self.emptyImageView.mas_bottom).with.offset(px1920Height(100));
    }];
    
    [self.emptyImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(superView.mas_top).with.offset(px1920Height(258));
        make.centerX.equalTo(superView);
    }];
    
}

@end
